package internal

import "go.uber.org/zap"

func (dbm *DBModule) registerHandler() {
	dbm.GetServerCoroRPC().RegisterHandler("LoadPlayer", loadPlayer)
	dbm.GetServerCoroRPC().RegisterHandler("SavePlayer", savePlayer)
}

func loadPlayer(args []any) (error, any) {
	account := args[0].(string)
	roleId := args[1].(uint64)
	zap.S().Infof("加载角色:%s %d", account, roleId)
	return nil, "load success"
}

func savePlayer(args []any) {
	account := args[0].(string)
	roleId := args[1].(uint64)
	zap.S().Infof("落地角色:%s %d", account, roleId)
}
